/**
 * 
 */
package org.ccay.excel.util.impl;

import org.ccay.excel.meta.ExcelMeta;
import org.ccay.excel.meta.SheetMeta;

/**
 * ExcelSupport基础类
 * 
 * @author chaowangbang
 * 
 */
public abstract class BaseExcelSupport {

	/**
	 * Excel的元数据定义
	 */
	protected ExcelMeta excelMeta;

	/**
	 * 权限验证
	 */
	//@Inject
	//private IPersonalPermissionService permissionService;

	/**
	 * @return
	 */
	public ExcelMeta getExcelMeta() {
		return this.excelMeta;
	}

	/**
	 * @param excelMeta
	 */
	public void setExcelMeta(ExcelMeta excelMeta) {
		this.excelMeta = excelMeta;
	}

	/**
	 * @param sheetName
	 * @return
	 */
	public SheetMeta getSheetMeta(String sheetName) {
		return this.excelMeta.getSheetMeta(sheetName);
	}

	/**
	 * @return
	 */
	public boolean validatePrivilege() {
		return ExcelUtil.validatePrivilege(this.excelMeta.getPrivilege());
	}
}
